package ModelLayer;

public class ProductLine
{
	private int quantity;
	private float subPrice;	
	private Product product;
	private SalesOrder order;
	
	//empty constructor
	public ProductLine()
	{}
	
	public ProductLine(int quantity)
	{
		this.quantity = quantity;
		product = new Product();
		order = new SalesOrder();
	}
	
	public SalesOrder getOrder()
	{
		return order;
	}
	public void setOrder(SalesOrder order)
	{
		this.order = order;
	}
	
	public int getQuantity()
	{
		return quantity;
	}
	public void setQuantity(int quantity)
	{
		this.quantity = quantity;
	}
	
	
	public float getSubPrice()
	{
		subPrice=quantity*getProduct().getSalesPrice();
		return subPrice;
	}	
	public void setSubPrice(float price)
	{
		this.subPrice = price;
	}
	
	public Product getProduct()
	{
		return product;
	}
	public void setProduct(Product theProduct)
	{
		product = theProduct;
	}
}
